<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="button" value="测试点击事件" onclick="textClick()">
    <input type="button" value="测试双击事件" ondblclick="textDblClick()">
    <div id="output"></div>
    <script>
        function textClick(){
            console.log("测试点击时间");
            document.getElementById("output").innerHTML = "点击事件触发: " + new Date().toLocaleTimeString();
        }

        function textDblClick(){
            console.log("测试双击事件");
            document.getElementById("output").innerHTML = "双击事件触发: " + new Date().toLocaleTimeString();
            alert("双击事件成功触发！");
        }
    </script>
</body>
</html>